#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
package ${package}.support;

import org.hibernate.dialect.MySQLDialect;
import org.hibernate.dialect.function.SQLFunctionTemplate;
import org.hibernate.type.StringType;

/**
 * 定义MYSQL方言
 * @author chenjianbo
 */
public class MySqlInnoDbDialect extends MySQLDialect {

    public MySqlInnoDbDialect() {
        super();
        registerFunction("convert_gbk", new SQLFunctionTemplate(StringType.INSTANCE, "convert(?1 using gbk)"));
        registerColumnType(93, "datetime(3)");
    }

    @Override
    public String getTableTypeString() {
        return " engine=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci";
    }

}
